package com.app.model;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 房屋
 * </p>
 *
 * @author yoominic
 * @since 2025-02-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
//@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fw implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 序号
     */
    @TableField("NUMBER")
    private Integer number;

    /**
     * 唯一标识值
     */
    private String idValue;


    private String leaseCertificateNumber;


    private String leaseCertificateNumberNew;

    /**
     * 旧的唯一标识值
     */
    private String oldIdValue;

    /**
     * 片区名称
     */
    private String areaName;

    /**
     * 街道名称
     */
    private String streetName;

    /**
     * 楼号
     */
    private String buildingNumber;

    /**
     * 院号
     */
    private String courtyardNumber;

    /**
     * 单元号
     */
    private String unitNumber;

    /**
     * 楼层
     */
    private String floorLevel;

    /**
     * 号
     */
    private String roomNumber;

    /**
     * 结构类型
     */
    private String structureType;

    /**
     * 房屋类型
     */
    private String houseType;

    /**
     * 房屋状态
     */
    private String houseStatus;

    /**
     * 房屋类区
     */
    private String houseAreaType;

    /**
     * 房屋方位
     */
    private String houseDirection;

    /**
     * 建筑面积
     */
    private Double buildingArea;

    /**
     * 使用面积
     */
    private Double usableArea;

    /**
     * 月使用单价
     */
    private Double monthlyUsableUnitPrice;

    /**
     * 阳台建筑面积
     */
    private Double balconyBuildingArea;

    /**
     * 阳台使用面积
     */
    private Double balconyUsableArea;

    /**
     * 阴台建筑面积
     */
    private Double shadyBalconyBuildingArea;

    /**
     * 阴台使用面积
     */
    private Double shadyBalconyUsableArea;

    /**
     * 其它建筑面积
     */
    private Double otherBuildingArea;

    /**
     * 其它使用面积
     */
    private Double otherUsableArea;

    /**
     * 合计月租
     */
    private Double totalMonthlyRent;

    /**
     * 间数
     */
    private String roomCount;

    /**
     * 室内设施
     */
    private String indoorFacilities;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 地下室建筑面积
     */
    private Double basementBuildingArea;

    /**
     * 地下室使用面积
     */
    private Double basementUsableArea;

    /**
     * 其它名称
     */
    private String otherName;

    /**
     * 有无配套
     */
    private String withFacilities;

    private LocalDateTime liveStatus;

    /**
     * 滞纳金标准
     */
    private BigDecimal lateFeeStandard;

    /**
     * 超标面积
     */
    private BigDecimal excessArea;

    /**
     * 超标单价
     */
    private BigDecimal excessUnitPrice;

    /**
     * 政策减免
     */
    private BigDecimal policyReduction;

    /**
     * 门牌号
     */
    private String mphValue;

    /**
     * QTXS 值
     */
    private BigDecimal qtxsValue;

    /**
     * XSFLAG 值
     */
    private BigDecimal xsflagValue;

    /**
     * XS 值
     */
    private BigDecimal xsValue;

    /**
     * BZJBZ 值
     */
    private BigDecimal bzjbzValue;

    /**
     * BZDJ 值
     */
    private BigDecimal bzdjValue;

    /**
     * 当前承租人姓名
     */
    private String currentTenantName;

    /**
     * 当前承租人身份证号
     */
    private String currentTenantIdCard;

    @TableField(exist = false)
    private String currentTenantIdCardLastFour;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime leaseRelationshipTime;

    /**
     * 当前承租人租赁证编号
     */
    private Integer currentTenantLeaseCertificateNumber;

    /**
     * 微信绑定的手机号
     */
    private String wechatBoundPhone;

    /**
     * 绑定时间
     */
    private LocalDateTime boundTime;

    /**
     * 人脸认证时间
     */
    private LocalDateTime faceAuthenticationTime;

    /**
     * BTDJ 值
     */
    private BigDecimal btdjValue;

    /**
     * 是否删除1是0否
     */
    private Integer isDel;

    private String addressValue;


    @TableField(exist = false)
    private String faceUrl;

    @TableField(exist = false)
    private String tenantName;

    @TableField(exist = false)
    private String tenantIdCard;

    @TableField(exist = false)
    private String tenantPhone;

    @TableField(exist = false)
    private String familyMembersJsonStr;

    @TableField(exist = false)
    private JSONArray familyMembers;

    @TableField(exist = false)
    private Integer familyMembersCount;

    /**
     * 收费标准
     */
    @TableField(exist = false)
    private Double unitPricePerSquare;

    @TableField(exist = false)
    private Double lqValue;

    @TableField(exist = false)
    private Double lcValue;

    /**
     * 调差后收费标准
     */
    @TableField(exist = false)
    private Double calculatedPrice;

    @TableField(exist = false)
    private Double totalPrice;

    @TableField(exist = false)
    private Double payableTotalPrice;


    //需缴房租
    @TableField(exist = false)
    private BigDecimal rentToBePaid;

    /**
     * 房租欠费天数
     */
    @TableField(exist = false)
    private Integer rentLateDays;

    //需缴房租开始时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime rentToBePaidStartTime;

    //需缴房租结束时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime rentToBePaidEndTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField(exist = false)
    private LocalDateTime expirationDate;


    @TableField(exist = false)
    private String aMatch;

    //需要缴纳的保证金
    @TableField(exist = false)
    private BigDecimal needDepositPaid;

    //保证金标准
    @TableField(exist = false)
    private BigDecimal needDepositPaidStandard;

    //滞纳金
    @TableField(exist = false)
    private BigDecimal lateFee;

    //滞纳天数
    @TableField(exist = false)
    private Long lateDays;

    //滞纳金欠费金额
    @TableField(exist = false)
    private BigDecimal arrearageRentToBePaid;

    //滞纳金开始天数
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime lateFeeStartTime;

    //滞纳金结束天数
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime lateFeeEndTime;


    //不是欠的物业费
    @TableField(exist = false)
    private BigDecimal propertyFee;

    //选择的年份
    @TableField(exist = false)
    private Integer propertyFeeTime;

    //可选缴纳物业费时间段
    @TableField(exist = false)
    private List<Map<String, Object>> propertyFeePeriods;

    //需缴物业费
    @TableField(exist = false)
    private BigDecimal needPropertyFee;

    //物业费欠费开始时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime needPropertyFeeStartTime;

    //物业费欠费结束时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime needPropertyFeeEndTime;

    //物业费欠费月数
    @TableField(exist = false)
    private Long needPropertyFeeMonthsBetween;

    //物业费标准
    @TableField(exist = false)
    private BigDecimal propertyFeeStandard;


    //最新承租人的建租时间
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime latestLeaseRelationshipTime;


    //标准时段
    @TableField(exist = false)
    private List<Map<String, Object>> timePeriods;


    //更多时段
    @TableField(exist = false)
    private List<Map<String, Object>> moreTimePeriods;


    @TableField(exist = false)
    private Double pqxs;

    @TableField(exist = false)
    private Double lcxs;

    @TableField(exist = false)
    private Double hjxs;

    @TableField(exist = false)
    private Double depositPaid;

    /**
     * 新保证金
     */
    @TableField(exist = false)
    private BigDecimal newDeposit;


    /**
     * 新保证金缴纳时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime newDepositPaymentTime;

    /**
     * 新归还保证金
     */
    @TableField(exist = false)
    private BigDecimal newDepositReturned;

    /**
     * 新归还保证金时间
     */
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime newDepositReturnTime;

    @TableField(exist = false)
    private Integer tenantRelationshipId;

    @TableField(exist = false)
    private String wechatPhoneNumber;

    @TableField(exist = false)
    private List<Map<String, Object>> arrearsFeesList;

    @TableField(exist = false)
    private Double yingjiaobiaozhun;

    @TableField(exist = false)
    private Double tiaojieyinsu;

    @TableField(exist = false)
    private Double shishoubiaozhun;

    @TableField(exist = false)
    private Double hejiyuezu;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime fwPaymentEnd;

    /**
     *
     */
    @TableField(exist = false)
    private Integer renewalRecordStatus;

    @TableField(exist = false)
    private List<FwSecurityDepositConfig> fwSecurityDepositConfigList;




}
